package com.jemmyee.core.entity;

// default package

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * @Description:会员
 * @author:jemmyee@gmail.com
 * @date:2011-4-1
 * @version:v1.0
 */
@Entity(name="com.jemmyee.core.entity.User")
@Table(name = "core_user")
public class User extends BaseEntity implements java.io.Serializable {

	// Fields
	private Integer id;
	private String email;
	private String name;
	private String password;
	private String safePassword;//安全交易码
	private String question;
	private String answer;
	private Short sex;//0 保密   1男  2女
	private Date birthday;
	private Double userMoney;//可用余额
	private Double frozenMoney;//冻结金额
	private Integer payPoints;//消费积分
	private Integer rankPoints;//会员等级积分
	private Integer addressId;//邮寄地址
	private Date addTime;//注册时间
	private Date lastLoginTime;
	private Date lastEditTime;
	private String lastLoginIp;
	private Integer visitCount;//访问次数
	private Integer rankId;
	private Short isSpecial;
	private String salt;
	private Integer parentId;//推荐人ID
	private Short status;
	private String nickName;//昵称
	private String msn;
	private String qq;
	private String officePhone;
	private String homePhone;
	private String mobilePhone;
	private Short isValidated;//是否验证
	private Double creditLine;//信用额度
	private String passwdQuestion;//安全问题
	private String passwdAnswer;//安全问题答案
	private Short isDelete;
	private Short isSetSale;//是否绑定店铺账号
	private Short isSetBuy;//是否绑定小号

    //临时变量
	private String vcode;//验证码  注册登录时需要
	
	@Transient
	public String getVcode() {
		return vcode;
	}

	public void setVcode(String vcode) {
		this.vcode = vcode;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "email", length = 60)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "name", unique = true, length = 60)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "password", length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "question")
	public String getQuestion() {
		return this.question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	@Column(name = "answer")
	public String getAnswer() {
		return this.answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	@Column(name = "sex")
	public Short getSex() {
		return this.sex;
	}

	public void setSex(Short sex) {
		this.sex = sex;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "birthday", length = 0)
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Column(name = "user_money", precision = 10)
	public Double getUserMoney() {
		return this.userMoney;
	}

	public void setUserMoney(Double userMoney) {
		this.userMoney = userMoney;
	}

	@Column(name = "frozen_money", precision = 10)
	public Double getFrozenMoney() {
		return this.frozenMoney;
	}

	public void setFrozenMoney(Double frozenMoney) {
		this.frozenMoney = frozenMoney;
	}

	@Column(name = "pay_points")
	public Integer getPayPoints() {
		return this.payPoints;
	}

	public void setPayPoints(Integer payPoints) {
		this.payPoints = payPoints;
	}

	@Column(name = "rank_points")
	public Integer getRankPoints() {
		return this.rankPoints;
	}

	public void setRankPoints(Integer rankPoints) {
		this.rankPoints = rankPoints;
	}

	@Column(name = "address_id")
	public Integer getAddressId() {
		return this.addressId;
	}

	public void setAddressId(Integer addressId) {
		this.addressId = addressId;
	}

	@Column(name = "add_time")

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	@Column(name = "last_login_time", length = 0)
	public Date getLastLoginTime() {
		return this.lastLoginTime;
	}


	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	@Column(name = "last_edit_time", length = 0)
	public Date getLastEditTime() {
		return this.lastEditTime;
	}

	public void setLastEditTime(Date lastEditTime) {
		this.lastEditTime = lastEditTime;
	}

	@Column(name = "last_login_ip", length = 15)
	public String getLastLoginIp() {
		return this.lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	@Column(name = "visit_count")
	public Integer getVisitCount() {
		return this.visitCount;
	}

	public void setVisitCount(Integer visitCount) {
		this.visitCount = visitCount;
	}

	@Column(name = "rank_id")
	public Integer getRankId() {
		return this.rankId;
	}

	public void setRankId(Integer rankId) {
		this.rankId = rankId;
	}

	@Column(name = "is_special")
	public Short getIsSpecial() {
		return this.isSpecial;
	}

	public void setIsSpecial(Short isSpecial) {
		this.isSpecial = isSpecial;
	}

	@Column(name = "salt", length = 10)
	public String getSalt() {
		return this.salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	@Column(name = "parent_id")
	public Integer getParentId() {
		return this.parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Column(name = "status")
	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	@Column(name = "nick_name", length = 60)
	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	@Column(name = "msn", length = 60)
	public String getMsn() {
		return this.msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}

	@Column(name = "qq", length = 20)
	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	@Column(name = "office_phone", length = 20)
	public String getOfficePhone() {
		return this.officePhone;
	}

	public void setOfficePhone(String officePhone) {
		this.officePhone = officePhone;
	}

	@Column(name = "home_phone", length = 20)
	public String getHomePhone() {
		return this.homePhone;
	}

	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}

	@Column(name = "mobile_phone", length = 20)
	public String getMobilePhone() {
		return this.mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	@Column(name = "is_validated")
	public Short getIsValidated() {
		return this.isValidated;
	}

	public void setIsValidated(Short isValidated) {
		this.isValidated = isValidated;
	}

	@Column(name = "credit_line", precision = 10)
	public Double getCreditLine() {
		return this.creditLine;
	}

	public void setCreditLine(Double creditLine) {
		this.creditLine = creditLine;
	}

	@Column(name = "passwd_question", length = 50)
	public String getPasswdQuestion() {
		return this.passwdQuestion;
	}

	public void setPasswdQuestion(String passwdQuestion) {
		this.passwdQuestion = passwdQuestion;
	}

	@Column(name = "passwd_answer")
	public String getPasswdAnswer() {
		return this.passwdAnswer;
	}

	public void setPasswdAnswer(String passwdAnswer) {
		this.passwdAnswer = passwdAnswer;
	}
	@Column(name = "is_delete")
	public Short getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(Short isDelete) {
		this.isDelete = isDelete;
	}
	@Column(name = "safe_password")
	public String getSafePassword() {
		return safePassword;
	}
	public void setSafePassword(String safePassword) {
		this.safePassword = safePassword;
	}
	@Column(name = "is_set_sale")
	public Short getIsSetSale() {
		return isSetSale;
	}

	public void setIsSetSale(Short isSetSale) {
		this.isSetSale = isSetSale;
	}
	@Column(name = "is_set_buy")
	public Short getIsSetBuy() {
		return isSetBuy;
	}

	public void setIsSetBuy(Short isSetBuy) {
		this.isSetBuy = isSetBuy;
	}
	
}